//
//  STwoTableViewCell.m
//  PocketFM
//
//  Created by sun on 15/12/16.
//  Copyright © 2015年 Sun. All rights reserved.
//

#import "STwoTableViewCell.h"
#import <UIButton+WebCache.h>

@interface STwoTableViewCell()
@property (weak, nonatomic) IBOutlet UILabel *cardTitle;
@property (weak, nonatomic) IBOutlet UIButton *icon;
@property (weak, nonatomic) IBOutlet UILabel *title;
@property (weak, nonatomic) IBOutlet UILabel *littleTitle;

@property (weak, nonatomic) IBOutlet UIButton *icon2;
@property (weak, nonatomic) IBOutlet UILabel *littleTitle2;
@property (weak, nonatomic) IBOutlet UILabel *title2;
@end
@implementation STwoTableViewCell
+ (instancetype)cellWithTabelView:(UITableView *)tableView{
    static NSString *ID = @"STwoTableViewCell";
    STwoTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (!cell) {
        cell = [[[NSBundle mainBundle] loadNibNamed:@"STwoTableViewCell" owner:nil options:nil] lastObject];
    }
    [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
    return cell;
}

//模型传值
- (void)setModel:(ListCategoryModel *)model{
    _model = model;
    
    self.cardTitle.text = model.cardTitle;
    
    ListReourceModel *mod = model.ReourceArray[0];
    self.title.text = mod.title;
    self.littleTitle.text = mod.reProgramName;
    
    [self.icon sd_setImageWithURL:[NSURL URLWithString:mod.img297_194] forState:UIControlStateNormal];
    
    ListReourceModel *mod2 = model.ReourceArray[1];
    self.title2.text = mod2.title;
    self.littleTitle2.text = mod2.reProgramName;
    
    [self.icon2 sd_setImageWithURL:[NSURL URLWithString:mod2.img297_194] forState:UIControlStateNormal];
}
@end
